package com.usian.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller   // 返回页面
//@RestController 以JSON格式返回给前端
public class IndexController {

    @RequestMapping("/index")
    public String index(Model model){
        model.addAttribute("name","我是前台显示的");
        return "index.html";
    }
}
